package skewreduce.framework;

import java.io.IOException;

import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;


public abstract class MultiOutputFormat<K,V> 
extends FileOutputFormat<K,V> {
    public RecordWriter<K,V> getRecordWriter(TaskAttemptContext job) throws IOException, InterruptedException {
        return getRecordWriter(job,null);
    }

    public RecordWriter<K,V> getRecordWriter(TaskAttemptContext job,String name) throws IOException, InterruptedException {
    	return getRecordWriter(job,name,true);
    }
    
    public abstract RecordWriter<K,V> getRecordWriter(TaskAttemptContext job,String name,boolean unique) throws IOException, InterruptedException;
}
